/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class ProfesionalDetachedCriteria extends AbstractORMDetachedCriteria {
	public final StringExpression nombreProf;
	public final StringExpression rutProf;
	public final StringExpression especialidad;
	
	public ProfesionalDetachedCriteria() {
		super(orm.Profesional.class, orm.ProfesionalCriteria.class);
		nombreProf = new StringExpression("nombreProf", this.getDetachedCriteria());
		rutProf = new StringExpression("rutProf", this.getDetachedCriteria());
		especialidad = new StringExpression("especialidad", this.getDetachedCriteria());
	}
	
	public ProfesionalDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, orm.ProfesionalCriteria.class);
		nombreProf = new StringExpression("nombreProf", this.getDetachedCriteria());
		rutProf = new StringExpression("rutProf", this.getDetachedCriteria());
		especialidad = new StringExpression("especialidad", this.getDetachedCriteria());
	}
	
	public EncuestaDetachedCriteria createIdPrefesionalCriteria() {
		return new EncuestaDetachedCriteria(createCriteria("idPrefesional"));
	}
	
	public EncuestaDetachedCriteria createEncuestaIdEncuestaCriteria() {
		return new EncuestaDetachedCriteria(createCriteria("ORM_EncuestaIdEncuesta"));
	}
	
	public Profesional uniqueProfesional(PersistentSession session) {
		return (Profesional) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Profesional[] listProfesional(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Profesional[]) list.toArray(new Profesional[list.size()]);
	}
}

